<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Tetris Game: /home/hokan/NetBeansProjects/TetrisGame/headers/irrwidget.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Tetris Game
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Test game project created via Irrlicht and Qt</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('irrwidget_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">/home/hokan/NetBeansProjects/TetrisGame/headers/irrwidget.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef QIRRWIDGET_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define QIRRWIDGET_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &quot;CGameApplication.h&quot;</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;QWidget&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &lt;QResizeEvent&gt;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#pragma GCC diagnostic ignored &quot;-Wunused-parameter&quot;</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#pragma GCC diagnostic ignored &quot;-Wunused-variable&quot;</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#include &lt;irrlicht.h&gt;</span>
<a name="l00011"></a>00011 <span class="preprocessor">#pragma GCC diagnostic warning &quot;-Wunused-parameter&quot;</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#pragma GCC diagnostic warning &quot;-Wunused-variable&quot;</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span>
<a name="l00014"></a>00014 <span class="keyword">using namespace </span>irr;
<a name="l00015"></a>00015 
<a name="l00019"></a><a class="code" href="class_qirr_widget.html">00019</a> <span class="keyword">class </span><a class="code" href="class_qirr_widget.html">QirrWidget</a> : <span class="keyword">public</span> QWidget {    
<a name="l00020"></a>00020     Q_OBJECT
<a name="l00021"></a>00021 <span class="keyword">public</span>:
<a name="l00027"></a>00027     <span class="keyword">explicit</span> <a class="code" href="class_qirr_widget.html">QirrWidget</a>(QWidget *parent = 0);
<a name="l00028"></a>00028     
<a name="l00032"></a>00032     ~<a class="code" href="class_qirr_widget.html">QirrWidget</a>();    
<a name="l00033"></a>00033     
<a name="l00039"></a>00039     IrrlichtDevice* getIrrlichtDevice();
<a name="l00040"></a>00040 
<a name="l00044"></a>00044     <span class="keywordtype">void</span> init();
<a name="l00045"></a>00045 signals:    
<a name="l00051"></a>00051     <span class="keywordtype">void</span> updateIrrlichtQuery(IrrlichtDevice* device);
<a name="l00052"></a>00052 <span class="keyword">public</span> slots:    
<a name="l00053"></a>00053     
<a name="l00059"></a>00059     <span class="keywordtype">void</span> updateIrrlicht(IrrlichtDevice* device);
<a name="l00060"></a>00060 <span class="keyword">protected</span>:    
<a name="l00064"></a>00064     <span class="keyword">virtual</span> <span class="keywordtype">void</span> paintEvent(QPaintEvent* event);
<a name="l00065"></a>00065     
<a name="l00069"></a>00069     <span class="keyword">virtual</span> <span class="keywordtype">void</span> timerEvent(QTimerEvent* event);
<a name="l00070"></a>00070 
<a name="l00074"></a>00074     <span class="keyword">virtual</span> <span class="keywordtype">void</span> resizeEvent(QResizeEvent* event);
<a name="l00075"></a>00075 
<a name="l00079"></a>00079     <span class="keyword">virtual</span> <span class="keywordtype">void</span> keyReleaseEvent(QKeyEvent *event);
<a name="l00080"></a>00080 
<a name="l00084"></a>00084     <span class="keyword">virtual</span> <span class="keywordtype">void</span> keyPressEvent(QKeyEvent *event);
<a name="l00085"></a>00085 
<a name="l00089"></a>00089     <span class="keyword">virtual</span> <span class="keywordtype">void</span> mousePressEvent(QMouseEvent* event);
<a name="l00090"></a>00090 
<a name="l00094"></a>00094     <span class="keyword">virtual</span> <span class="keywordtype">void</span> mouseReleaseEvent(QMouseEvent* event);
<a name="l00095"></a>00095     
<a name="l00099"></a>00099     <span class="keyword">virtual</span> <span class="keywordtype">void</span> mouseMoveEvent(QMouseEvent *event);
<a name="l00100"></a>00100 
<a name="l00104"></a>00104     <span class="keyword">virtual</span> <span class="keywordtype">void</span> wheelEvent(QWheelEvent* event);
<a name="l00105"></a>00105     
<a name="l00109"></a><a class="code" href="class_qirr_widget.html#a6f827affd555e664ae8ec759b6304e95">00109</a>     irr::video::E_DRIVER_TYPE <a class="code" href="class_qirr_widget.html#a6f827affd555e664ae8ec759b6304e95">driverType</a>;
<a name="l00110"></a>00110     
<a name="l00114"></a><a class="code" href="class_qirr_widget.html#aa693417c5a0e85bf6c8d1d62246fe58a">00114</a>     IrrlichtDevice *<a class="code" href="class_qirr_widget.html#aa693417c5a0e85bf6c8d1d62246fe58a">device</a>;
<a name="l00115"></a>00115 
<a name="l00116"></a>00116 <span class="keyword">private</span>:
<a name="l00120"></a>00120     <a class="code" href="class_c_game_application.html">CGameApplication</a>* gameApplication;
<a name="l00121"></a>00121     
<a name="l00125"></a>00125     <span class="keyword">struct </span>SIrrlichtKey {
<a name="l00126"></a>00126         irr::EKEY_CODE code;
<a name="l00127"></a>00127         <span class="keywordtype">wchar_t</span> ch;
<a name="l00128"></a>00128     };
<a name="l00129"></a>00129 
<a name="l00136"></a>00136     SIrrlichtKey convertToIrrlichtKey(<span class="keywordtype">int</span> key);
<a name="l00137"></a>00137 
<a name="l00144"></a>00144     <span class="keywordtype">void</span> sendKeyEventToIrrlicht(QKeyEvent* event, <span class="keywordtype">bool</span> pressedDown);
<a name="l00145"></a>00145     
<a name="l00152"></a>00152     <span class="keywordtype">void</span> sendMouseEventToIrrlicht(QMouseEvent* event, <span class="keywordtype">bool</span> pressedDown);
<a name="l00153"></a>00153 };
<a name="l00154"></a>00154 <span class="preprocessor">#endif // QIRRWIDGET_H</span>
</pre></div></div><!-- contents -->
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>irrwidget.h</b>      </li>

    <li class="footer">Generated on Sun Jul 6 2014 19:35:11 for Tetris Game by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
